<?php
//*************************************************************************
//* Bali Open License 1.0
//*
//* The contents of this file are from Bali. You can use it in any way
//* only if you keep this header. 
//*
//* http://www.BaliOnWeb.com
//*
//*************************************************************************

include_once 'mysql_data.php';
include_once 'fb_datastore_data.php';

if ($USE_DATA_API)
{
  // use FB DB
  function get_all_restaurants_data()
    { return fb_data_get_all_restaurants_data(); }
  function restaurant_get_users($restaurant)
    { return fb_data_restaurant_get_users($restaurant); }
  function user_get_restaurants($user)
    { return fb_data_user_get_restaurants($user); }
  function get_restaurants_from_friends($friends_array)
    { return fb_data_get_restaurants_from_friends($friends_array); }
  function user_rate_restaurant($user, $restaurant, $rating)
    { return fb_data_user_rate_restaurant($user, $restaurant, $rating); }
  function user_remove_restaurant($user, $restaurant)
    { return fb_data_user_remove_restaurant($user, $restaurant); }
  function user_get_restaurant_rating($user, $restaurant)
    { return fb_data_user_get_restaurant_rating($user, $restaurant); }
} else {
  // use my personal DB
  function get_all_unanswered_questions($user)
  {
  	return mysql_get_all_unanswered_questions($user);
  }

  	//	$arr_param['do'] = 'submit' 'ignore';
	//	$arr_param['q_list'] = $_REQUEST['q_list'];
	//	$arr_param['s_id'] = $_REQUEST['s_id'];
  	function set_answers($arr_param)
	{
	  	return mysql_set_answers($arr_param);
	}
  
  function get_all_restaurants_data()
    { return mysql_get_all_restaurants_data(); }
  function restaurant_get_users($restaurant)
    { return mysql_restaurant_get_users($restaurant); }
  function user_get_restaurants($user)
    { return mysql_user_get_restaurants($user); }
  function get_restaurants_from_friends($friends_array)
    { return mysql_get_restaurants_from_friends($friends_array); }
  function user_rate_restaurant($user, $restaurant, $rating)
    { return mysql_user_rate_restaurant($user, $restaurant, $rating); }
  function user_remove_restaurant($user, $restaurant)
    { return mysql_user_remove_restaurant($user, $restaurant); }
  function user_get_restaurant_rating($user, $restaurant)
    { return mysql_user_get_restaurant_rating($user, $restaurant); }
}

?>

